#!/usr/bin/perl

print "content-type: text/html \n\n"; #The header

$filepath = "myhtml.html";

sysopen (HTML, '$filepath', O_RDWR|O_EXCL|O_CREAT, 0755) or die "$filepath cannot be opened.";
printf HTML "<html>\n"; 
printf HTML "<head>\n"; 
printf HTML "<title>My Home Page</title>"; 
printf HTML "</head>\n"; 
printf HTML "<body>\n"; 
printf HTML "<p align='center'>Here we have an HTML 
page with a paragraph.</p>";
printf HTML "</body>\n"; 
printf HTML "</html>\n"; 
close (HTML);